package com.study.lxy.springcloud.uclient.controller;

import com.study.lxy.springcloud.common.format.ServiceResp;
import com.study.lxy.springcloud.uclient.entity.ClientUser;
import com.study.lxy.springcloud.uclient.service.UserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserLoginController {
    @Autowired
    private UserLoginService userLoginService;
    @RequestMapping(value = "/loginOn",method = RequestMethod.POST)
    public ServiceResp loginOn(@RequestBody ClientUser user){
        userLoginService.loginOn(user);
        return ServiceResp.dummyResp();
    }

    @RequestMapping(value = "/loginOut",method = RequestMethod.POST)
    public ServiceResp loginOut(){
        userLoginService.loginOut();
        return ServiceResp.dummyResp();
    }

}
